﻿using System.Collections.Generic;
using ProjectCore.EntityFrameworkCore;
using System.Threading.Tasks;
using ProjectCore.Domain.DomainService;
using ProjectCore.Domain.Model.Entity;
using ProjectCore.Domain.Repository.Interfaces;

namespace ProjectCore.Infrastructure.DomainService
{
    public class EvalDomainService:IEvalDomainService
    {
        private readonly IBaseRepository<Eval> _baseRepository;
        private readonly MyContext myContext;
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="userRepository"></param>
        public EvalDomainService(IBaseRepository<Eval> baseRepository, MyContext _myContext)
        {
            _baseRepository = baseRepository;

            myContext = _myContext;
        }
        /// <summary>
        /// 显示
        /// </summary>
        /// <returns></returns>
        public async Task<List<Eval>> GetEval()
        {
            return await _baseRepository.LoadEntityAllAsync();
        }
    }
}
